<style type="text/css">
    .task1 p{ color: red;font-size: 12px;}
    .task1 span{color:red;}
</style>
<div class="task1">
    <?php
    echo '<div>';
    echo '</div>';
    $sex = array(' ' => '-please select-', 'Female' => 'Female', 'Male' => 'Male');
    $usertype = array(' ' => '-please select-', 1 => 'admin', 0 => 'Receptionist');
    echo form_open('user/add');
    echo '<div class="form-wrapper">';
    echo '<fieldset style="margin: 0 auto;width:auto;height: auto;border: 1px #ccc solid; padding:20px 15px 20px 15px;-moz-border-radius:10px;">';
    if ($this->session->userdata('ms_error')) {
        echo message($this->session->userdata('ms_error'), "error");
        $this->session->unset_userdata("ms_error");
    }
    echo '<legend align="center"><div class="heading"  style="margin: 0 auto;width: 100%;height: auto;border: 0px #ccc solid;text-align: center;font-size: 20px;">Add new user</div></legend>';
    echo '<div style="float: right; border: 0px #ccc solid; margin-top: -25px;">';
    echo anchor('user/manager', img('images/user_images/cancel.png'));
    echo '</div>';
    echo '<table align="center" width="70%">';
    echo '<tr>';
    echo '<td valign="top">UserName<span>*</span>&nbsp;</td>';
    $value_username = set_value('txtuser');
    echo '<td>' . form_input(array('id' => 'iduser', 'name' => 'txtuser', 'value' => $value_username)) . $this->session->userdata('invalid_user') . form_error('txtuser');
    $this->session->unset_userdata('invalid_user');
    '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td valign="top">Password<span>*</span>&nbsp;</td>';
    echo '<td>' . form_password(array('name' => 'txtpassword', 'id' => 'idpass', 'value' =>'')).$this->session->userdata('invalid_pas');
    $this->session->unset_userdata('invalid_pas') . form_error('txtuser');
    '</td>';
    echo '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td valign="top">Confirmation<span>*</span>&nbsp;</td>';
    echo '<td>' . form_password(array('name' => 'txtcon_word', 'value' =>'')).form_error('txtcon_word') . '</td>';
    echo '<td>' . $this->session->userdata('invalid_pas') . '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<tr>';
    echo '<td valign="top">Position</td>';
    echo '<td>' . form_dropdown('txtposition', $usertype, $this->input->post("txtposition") ? $this->input->post("txtposition") : " ") . '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td valign="top">Sex</td>';
    echo '<td>' . form_dropdown('txtsex', $sex, $this->input->post("txtsex") ? $this->input->post("txtsex") : " ") . '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td valign="top">Email<span>*</span>&nbsp;</td>';
    echo '<td>' . form_input(array('name' => 'txtemail', 'id' => 'idemail', 'value' => $this->input->post("txtemail") ? $this->input->post("txtemail") : " ")) . form_error('txtemail') . '</td>';
    echo '<tr><td>';
    echo $this->session->userdata('invalid_email');
    $this->session->unset_userdata('invalid_email');
    echo '</td></tr>';
    echo '</tr>';
    echo '<tr>';
    echo '<td></td>';
    echo '<td>' . form_submit('btn_submit', 'Add') . form_reset('btn_reset', 'Reset') . '</td>';
    echo '</tr>';
    echo '</table>';
    echo '<p>Note : (*) must be insert!<p>';
    echo '</fieldset>';
    echo '</div>';
    echo form_close();
    ?>
</div>